	
	var s_province = document.getElementById('s_province').value;
	var s_eparchy_code = document.getElementById('s_eparchy_code').value;
  var s_city_code =  document.getElementById('s_city_code').value;
	
	setProvince();
	
	function setProvince()
	{
			Ts_areaInfo.getAreaClassByUpId('000000000000000',function(data){
			DWRUtil.removeAllOptions('province');
			DWRUtil.addOptions("province",{'':'请选择'});
			DWRUtil.addOptions('province',data);
			for (var i = 0; i < document.getElementById('province').options.length; i++) 
			{       
		      if (document.getElementById('province').options[i].value == s_province) 
		      {        
		           document.getElementById('province')[i].selected = true;        
		      }      
	    } 
		})
	}
	
	setCitys(s_province);
	
	function setCitys(prov)
	{
	   var provence=prov;
		 Ts_areaInfo.getAreaClassByUpId(provence,function(data){
			DWRUtil.removeAllOptions('eparchy_code');
			DWRUtil.addOptions("eparchy_code",{'':'请选择'});
			DWRUtil.addOptions('eparchy_code',data);
			DWRUtil.removeAllOptions('city_code');
			DWRUtil.addOptions('city_code',{'':'请选择'});
			var sel_eparchy_code = document.getElementById('s_eparchy_code').value;
			if(sel_eparchy_code!='')			
			{
					for (var i = 0; i < document.getElementById('eparchy_code').options.length; i++) 
					{       
				      if (document.getElementById('eparchy_code').options[i].value == s_eparchy_code) 
				      {        
				           document.getElementById('eparchy_code')[i].selected = true;
				           document.getElementById('s_eparchy_code').value='';        
				      }      
			    }
		  }
		});
	}
	
	
	setAreas(s_eparchy_code);
	
	function setAreas(city_id){
		Ts_areaInfo.getAreaClassByUpId(city_id,function(data){
		 	DWRUtil.removeAllOptions('city_code');
	    DWRUtil.addOptions("city_code",{'':'请选择'});
		 	DWRUtil.addOptions('city_code',data);
		 	var sel_city_code =  document.getElementById('s_city_code').value;	
		 	if(sel_city_code!='')
		 	{
			 	for (var i = 0; i < document.getElementById('city_code').options.length; i++) 
			 	{       
	               
			      if (document.getElementById('city_code').options[i].value == s_city_code) 
			      {        
			           document.getElementById('city_code')[i].selected = true;
			           document.getElementById('s_city_code').value='';        
			      }      
		    }
		}
		
		
		});
	}